import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '@/views/Home.vue';
import Cart from '@/views/Cart.vue';
import User from '@/views/User.vue';
import CateGory from '@/views/cateGory.vue';
import Detail from '@/views/Detail.vue';
import Login from '@/views/Login/Login.vue';

Vue.use(VueRouter);
const routes = [
  {
    path:'/',
    redirect:'/Login'
  },
  {
    path: '/Home',
    component: Home,
    name: 'Home',
  }, {
    path: '/cart',
    component: Cart,
    name: 'cart',
  }, {
    path: '/User',
    component: User,
    name: 'User',
  }, {
    path: '/Login',
    component: Login,
    name: 'Login',
  }, {
    path: '/category',
    component: CateGory,
    name: 'category',
  }, {
    path: '/Detail',
    component: Detail,
    name: 'Detail',
  },
];

const router = new VueRouter({ routes });

export default router;
